﻿using Stee.CAP8.MessageBus.Message;
using System;
using System.Collections.Generic;
using System.Text;

namespace test.kafka.usercode
{
    public class PaymentHandler : IEventHandler<PaymentStartedEvent>,IEventHandler<OrderCreatedEvent>
    {
        public IBus Bus { get; set; }
        public PaymentHandler(
            //IBus bus
            ) 
        {
            //_bus = bus;

        }
        public void Handle(PaymentStartedEvent evtArgs)
        {
            Console.WriteLine(Bus);
            Console.WriteLine($"我收到了消息{evtArgs.Body}");
        }

        public void Handle(OrderCreatedEvent evtArgs)
        {
            Console.WriteLine("订单已经创建好了");
        }
    }



}
